#top-bar {
  --#{$prefix}topbar-height: 45px;
  --#{$prefix}topbar-color: rgb(152, 169, 212);
  --#{$prefix}transition: all 0.5s linear 0s;
  position: relative;
  height: var(--#{$prefix}topbar-height);
  line-height: var(--#{$prefix}topbar-height);
  background: var(--#{$prefix}primary);
  color: var(--#{$prefix}topbar-color);
  font-size: $font-size-sm;
  z-index: 1045;
  //   transition: var(--#{$prefix}transition);

  .top-links {
    position: relative;
    a {
      position: relative;
      line-height: var(--#{$prefix}topbar-height);
      color: var(--#{$prefix}topbar-color);
      margin: 0 8px;
      text-decoration: none;

      &::before {
        content: "";
        position: absolute;
        top: -5px;
        width: 100%;
        border-top: 2px solid var(--#{$prefix}topbar-color);
        transform: scaleX(0);
        // transition: var(--#{$prefix}transition);
        transition: all 0.1s ease-out 0s;
      }

      &::after {
        content: "";
        position: absolute;
        bottom: 0;
        right: -10px;
        height: $font-size-sm;
        border-right: 1px solid var(--#{$prefix}topbar-color);
      }

      &:hover {
        &::before {
          // width: 100%;
          transform: scaleX(1);
          // transition: var(--#{$prefix}transition);
          border-color: #fff;
        }
      }

      &:last-child::after {
        border-right: 0 !important;
      }
    }
  }
  .search {
    position: relative;

    .search-wrapper {
      position: absolute;
      top: 8px;
      right: 0;
      z-index: 2;
      font-size: 18px;
      padding: 0;
      margin: 0;
      box-shadow: var(--#{$prefix}box-shadow-sm);
      display: flex;
      align-items: center;

      .search-input-container {
        position: relative;
        display: flex;
        align-items: center;
        .search-input {
          border: none;
          color: $gray-500;
          font-size: 16px;
          line-height: 1.75;
          margin: 0;
          padding: 0;
          width: 0;
          transition: all 0.2s ease-in-out;

          &:focus {
            outline: none;
          }

          &::placeholder {
            color: $gray-300;
          }
        }
      }

      .search-clear {
        cursor: pointer;
        display: none;
        position: absolute;
        height: 20px;
        width: 20px;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        &.show {
          display: block;
        }
      }

      .search-btn {
        background: $gray-50;
        cursor: pointer;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        transition: all 0.2s ease-in-out;

        .search-logo {
          height: 24px;
          width: 24px;
        }

        &:hover {
          opacity: 1;
        }

        &.disabled {
          background: transparent;
          // cursor: not-allowed;
          opacity: 0.75;
          // pointer-events: none
        }
      }

      &.active {
        .search-input {
          padding: 0 12px;
          width: calc(100vw - 60px);
        }
      }
    }

    .search-result {
      position: absolute;
      top: 32px;
      right: 0;
      padding-left: 16px;
      display: none;
      list-style: none;
      width: calc(100vw - 32px);
      max-height: 272px;
      overflow-y: auto;

      // &::-webkit-scrollbar {
      //     display: none;
      //     /* Chrome Safari */
      // }
      // scrollbar-width: none;
      // /* firefox */
      // -ms-overflow-style: none;
      // /* IE 10+ */
      &.show {
        display: block;
        z-index: 1;
        background: #ffffff;
        box-shadow: var(--#{$prefix}box-shadow);
        padding-top: 12px;
        padding-bottom: 4px;

        li {
          margin-bottom: 4px;
        }

        a {
          text-decoration: none;
          display: block;
          font-size: 14px;
          line-height: 22px;
          width: calc(100% - 16px);
          padding-right: 32px;

          &:hover {
            color: $warning;
            background-image: url("data: image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8' /%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: center right;
          }
        }
      }
    }
  }
}
@include media-breakpoint-up(sm) {
  #top-bar {
    .search {
      .search-wrapper {
        &.active {
          .search-input {
            width: 292px;
            max-width: calc(100vw - 60px);
          }
        }
      }

      .search-result {
        width: 320px;
        max-width: calc(100vw - 28px);
      }
    }
  }
}
